<!DOCTYPE html>
<html lang="en">

<head>
  <meta charset="UTF-8">
  <meta http-equiv="X-UA-Compatible" content="IE=edge">
  <meta name="viewport" content="width=device-width, initial-scale=1.0">
  <title>Document</title>
</head>

<body>

  <div>
    <div id="uncle1">
      <div class="firstUncle"></div>
      <div class="firstUncle"></div>
      <div class="firstUncle"></div>
      <div class="firstUncle"></div>
    </div>
    <div id="root">
      <div id="id1"></div>
    </div>
    <div id="uncle2">
      <div id="id2" class="secondUncle"></div>
      <div id="id3" class="secondUncle"></div>
      <div id="id4" class="secondUncle"></div>
      <div id="id5" class="secondUncle"></div>
    </div>
    <div id="uncle3">
      <div class="thridUncle"></div>
      <div class="thridUncle"></div>
      <div class="thridUncle"></div>
      <div class="thridUncle"></div>
    </div>
  </div>
</body>
<script>
  var curNode = document.getElementById("id1")
  var uncles = curNode.parentNode.parentNode.children
  var siblings = []
  for (let i = 0; i < uncles.length; ++i) {
    if (uncles[i] != curNode.parentNode) {
      siblings = siblings.concat(Array.from(uncles[i].children))
    }
  }
  console.log(siblings)

</script>

</html>